#include "DialogBookInfo.h"

//(*InternalHeaders(DialogBookInfo)
#include <wx/intl.h>
#include <wx/string.h>
//*)

//(*IdInit(DialogBookInfo)
const long DialogBookInfo::ID_TEXTCTRL1 = wxNewId();
const long DialogBookInfo::ID_TEXTCTRL2 = wxNewId();
const long DialogBookInfo::ID_COMBOBOX1 = wxNewId();
const long DialogBookInfo::ID_STATICBOX1 = wxNewId();
const long DialogBookInfo::ID_STATICBOX2 = wxNewId();
const long DialogBookInfo::ID_BUTTON1 = wxNewId();
const long DialogBookInfo::ID_STATICBOX3 = wxNewId();
const long DialogBookInfo::ID_STATICBOX4 = wxNewId();
const long DialogBookInfo::ID_TEXTCTRL3 = wxNewId();
const long DialogBookInfo::ID_STATICBOX6 = wxNewId();
const long DialogBookInfo::ID_TEXTCTRL4 = wxNewId();
const long DialogBookInfo::ID_BUTTON2 = wxNewId();
const long DialogBookInfo::ID_BUTTON3 = wxNewId();
//*)

BEGIN_EVENT_TABLE(DialogBookInfo,wxDialog)
	//(*EventTable(DialogBookInfo)
	//*)
END_EVENT_TABLE()

DialogBookInfo::DialogBookInfo(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size)
{
	//(*Initialize(DialogBookInfo)
	Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("id"));
	SetClientSize(wxSize(386,456));
	Move(wxDefaultPosition);
	TextCtrl1 = new wxTextCtrl(this, ID_TEXTCTRL1, _("Text"), wxPoint(88,96), wxSize(176,32), 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
	TextCtrl2 = new wxTextCtrl(this, ID_TEXTCTRL2, _("Text"), wxPoint(88,208), wxSize(176,27), 0, wxDefaultValidator, _T("ID_TEXTCTRL2"));
	ComboBox1 = new wxComboBox(this, ID_COMBOBOX1, wxEmptyString, wxPoint(88,152), wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_COMBOBOX1"));
	StaticBox1 = new wxStaticBox(this, ID_STATICBOX1, _("作者"), wxPoint(24,104), wxDefaultSize, 0, _T("ID_STATICBOX1"));
	StaticBox2 = new wxStaticBox(this, ID_STATICBOX2, _("类型"), wxPoint(24,152), wxDefaultSize, 0, _T("ID_STATICBOX2"));
	Button1 = new wxButton(this, ID_BUTTON1, _("增删"), wxPoint(288,144), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
	StaticBox3 = new wxStaticBox(this, ID_STATICBOX3, _("指纹"), wxPoint(24,208), wxDefaultSize, 0, _T("ID_STATICBOX3"));
	StaticBox4 = new wxStaticBox(this, ID_STATICBOX4, _("页数"), wxPoint(24,272), wxDefaultSize, 0, _T("ID_STATICBOX4"));
	TextCtrl3 = new wxTextCtrl(this, ID_TEXTCTRL3, _("Text"), wxPoint(88,272), wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL3"));
	StaticBox6 = new wxStaticBox(this, ID_STATICBOX6, _("书名"), wxPoint(24,48), wxDefaultSize, 0, _T("ID_STATICBOX6"));
	TextCtrl4 = new wxTextCtrl(this, ID_TEXTCTRL4, _("Text"), wxPoint(88,40), wxSize(136,27), 0, wxDefaultValidator, _T("ID_TEXTCTRL4"));
	Button2 = new wxButton(this, ID_BUTTON2, _("提交"), wxPoint(56,368), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
	Button3 = new wxButton(this, ID_BUTTON3, _("关闭"), wxPoint(192,368), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON3"));
	
	Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DialogBookInfo::OnEditGenre);
	Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DialogBookInfo::OnSubmit);
	Connect(ID_BUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&DialogBookInfo::OnClose);
	//*)

	DlgGenre = new DialogGenreEdit(this);
	DlgGenre->Show(false);
}

DialogBookInfo::~DialogBookInfo()
{
	//(*Destroy(DialogBookInfo)
	//*)

	if(DlgGenre)
        delete DlgGenre;
}


void DialogBookInfo::OnSubmit(wxCommandEvent& event)
{
}

void DialogBookInfo::OnClose(wxCommandEvent& event)
{
    this->Show(false);
}

void DialogBookInfo::OnEditGenre(wxCommandEvent& event)
{
    DlgGenre->Show(true);
}
